Current Location: Home> Function Categories> octdec

octdec

Convert octal to decimal
Name:octdec
Category:math
Programming Language:php
One-line Description:Convert octal to decimal.

Definition and usage

The octdec() function converts octal to decimal.

Example

 <?php
echo octdec ( "36" ) ;
echo octdec ( "12" ) ;
echo octdec ( "3063" ) ;
echo octdec ( "106" ) ;
?>

Try it yourself

grammar

 octdec ( octal_string )
parameter describe
octal_string Required. Specifies the octal number to be converted.

illustrate

Returns the decimal equivalent value of the octal number represented by the octal_string parameter. The maximum convertible value is 177777777777 or 2147483647 in decimal. Starting with PHP 4.1.0, the function can handle large numbers, in which case it returns the float type.

Similar Functions
Popular Articles